package  
{
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	/**
	 * ...
	 * @author Seven Gae
	 */
	public class Menu extends MovieClip
	{
		private var background: FlashingBackground;
		
		public function Menu() 
		{	
			background = new FlashingBackground();
			Main.Self.screen.addChild(this);
			this.btPlay.addEventListener(MouseEvent.CLICK, handlePlayButtom);
		}
		
		private function handlePlayButtom(Evento:MouseEvent):void
		{
			this.btPlay.removeEventListener(MouseEvent.CLICK, handlePlayButtom);
			Main.Self.screen.removeChild(this);
			Main.Self.gameState = GameState.GAME;
			
			background.destroy();
			
			LevelManager.current = new Splash();
		}
		
		public function update():void
		{
			background.update();
		}
		
	}

}